package com.epichust.bootumpp.service.impl;

import com.epichust.bootumpp.model.dao.Umpp5ProRouteLineDao;
import com.epichust.bootumpp.model.entity.Umpp5ProRouteLine;
import com.epichust.bootumpp.service.IUmpp5ProRouteLineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author ：longyang
 * @date ：Created in 2021/1/7 13:53
 * @description： 产品工艺路线service
 */
@Service
@Transactional
public class Umpp5ProRouteLineServiceImpl implements IUmpp5ProRouteLineService {

    @Autowired
    private Umpp5ProRouteLineDao umpp5ProRouteLineDao;

    /**
     * 分页查询产品工艺路线
     * @param map
     * @return
     */
    @Override
    public List<Umpp5ProRouteLine> getAllUmpp5ProRouteLine(Map<String, Object> map) {
        if(map.get("proRouteLineCode") != null){
            String [] proRouteLineCodeArr = map.get("proRouteLineCode").toString().split(",");
            map.put("proRouteLineCode",proRouteLineCodeArr);
        }
        List<Umpp5ProRouteLine> list = umpp5ProRouteLineDao.getAllUmpp5ProRouteLine(map);
        return list;
    }

}
